package com.wltjack.springboot.controller.jms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/jms/customer")
public class CustomerController {
	private transient final Logger log = LoggerFactory.getLogger(getClass());
	
	@JmsListener(destination = "active.test.queue") // @JmsListener是Spring 4.1所提供的用于监听JMS消息的注解，该注解的属性destination用于指定要监听的目的地
	public void readActiveTestQueue(String message) {
		log.info("from Queue[name='active.test.queue'] receive msg: "+message);
	}

	
}
